/**
 * Created by BD on 2017/5/25.
 */
var str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
var random = function () {
    var index = parseInt(Math.random()*64);
    return str.substring(index,index+1);
};
module.exports = {
    random: function (len) {
        if(!len) len = 10;
        var res = '';
        while(len){
            res += random();
            len--;
        }
        return res;
    }
};